/*
 * SPDX-FileCopyrightText: Copyright (c) 2016-2025 Objectionary.com
 * SPDX-License-Identifier: MIT
 */
package org.eolang.maven;

import com.jcabi.manifests.Manifests;
import java.time.ZoneOffset;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;

/**
 * A piece of text generated in runtime, to be injected into the files
 * that we generate as output, for example .java files.
 * @since 0.27
 */
final class Disclaimer {

    @Override
    public String toString() {
        return String.join(
            "",
            "This file was auto-generated by eo-maven-plugin (",
            Manifests.read("EO-Version"),
            " ",
            Manifests.read("EO-Revision"),
            " ",
            Manifests.read("EO-Dob"),
            ") on ",
            ZonedDateTime.now(ZoneOffset.UTC).format(
                DateTimeFormatter.ISO_INSTANT
            ),
            "; your changes will be discarded on the next build"
        );
    }
}
